<%@page import="com.kaishengit.pms.util.TimeNoteUtil"%>
<%@page import="com.kaishengit.pms.entity.Idea"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		body{
			background-image:url(img/bb.jpg);
			background-repeat:repeat-x;
		}
	</style>
</head>
<body class="body">
	<%@ include file="include/main-top.jsp" %>
	<div class="container">
	  <div class="row">
		<jsp:include page="include/left.jsp">
			<jsp:param value="idea" name="tag"/>
		</jsp:include>
		<div class="span9">
			<ul style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px" class="breadcrumb">
				<li class="active">
					<a href="idea.jspx?m=jump2idea&projectid=${ep.project.id }"><i class="icon-fire"></i><h3 style="display:inline">想法</h3></a>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a class="link-black" href="idea.jspx?m=addidea">发表想法</a></li>
			</ul>
			<div style="margin-bottom:20px;" class="wall">
				<% 
					List<Idea> idealist = (List<Idea>)session.getAttribute("idealist");
					for(Idea il : idealist){
				 %>
					<blockquote>
					  <h4><a href="idea.jspx?m=showidea&ideaid=<%=il.getId()%>"><%=il.getTitle() %></a></h4>
					  <p style="font-size:14px;line-height:1.5;"><%=il.getContent() %></p>
					  <small><%=TimeNoteUtil.getTime(il.getCreatetime()) %></small>
					  <a title="编辑" href="idea.jspx?m=update&ideaid=<%=il.getId() %>"><i class="icon-pencil"></i></a>
					  <a title="删除" href="javascript:;" onclick=del(this) ref="<%=il.getId() %>"><i class="icon-trash"></i></a>
					</blockquote>
				<%} %>
				<div class="pagination pull-right">
				  <ul>
					<li><a href="#">Prev</a></li>
					<li class="active">
					  <a href="#">1</a>
					</li>
					<li><a href="#">2</a></li>
					<li><a href="#">3</a></li>
					<li><a href="#">4</a></li>
					<li><a href="#">Next</a></li>
				  </ul>
				</div>
				
				<div class="clear"></div>
			</div>
			
		</div>
	  </div>
	</div>
	
</body>

		<script type="text/javascript">
			
			function del(obj){
				if(confirm("你确定要删除此想法吗？（请先删除想法里面的评论，再执行此操作。）")){
					var ss =  $(obj).attr("ref");
					var del = "del";
					
					$.get("idea.jspx",{m:del,ideaid:ss});
	
					var bq = $(obj).parent();
					bq.remove();
				}
			};
						
		</script>

</html>